<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Inheritance Example 1</title>
    <style>
        .parent {
            /* 设置父元素的字体颜色为蓝色 */
            color: blue;
            
        }

        /* 子元素没有指定颜色，所以会继承父元素的颜色 */
    </style>
</head>

<body>

    <div class="parent">
        <p>This is a paragraph with inherited text color.</p>
        <span>This is a span with inherited text color.</span>
    </div>

</body>

</html>